package com.app.web.merchant;

import com.app.base.BaseBean;
import com.app.utils.base.j2se.Convert;
import com.app.utils.base.j2se.JsonUtil;

import java.util.Map;

/**
 * Description
 * Created by 王伟
 * Date create on 11:35 2019/11/26.
 */
public class MerchantPics extends BaseBean {
    /**
     * 商家ID
     */
    private int merchantId;

    /**
     * 图片类型
     */
    private int picType;

    /**
     * 图片列表，都好分割
     */
    private String pics;

    public int getMerchantId() {
        return merchantId;
    }

    public void setMerchantId(int merchantId) {
        this.merchantId = merchantId;
    }

    public int getPicType() {
        return picType;
    }

    public void setPicType(int picType) {
        this.picType = picType;
    }

    public String getPics() {
        return pics;
    }

    public void setPics(String pics) {
        this.pics = pics;
    }

    public Map<String,Object> toMap(){
        Map<String ,Object> data = JsonUtil.beanToMap(this);
        data.put("typeName", this.picType==1?"职业许可":this.picType==2?"原厂认证":this.picType==3?"荣誉展示":"商家环境");
        data.put("pics", Convert.objToStr(this.pics).split(","));
        return data;
    }
}
